/*
 * bomb_list.h
 *
 *  Created on:  2013
 *      Author: Eddy Zogbo and Moncef Sbay
 */

#ifndef BOMB_LIST_H_
#define BOMB_LIST_H_

#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include <SDL_image.h>

#include "../include/constant.h"
#include "../include/player.h"
#include "../include/bomb.h"

//alias definition
typedef struct cell *t_cell;
typedef struct bomb_list *t_bomb_list;
typedef struct cell cell;
typedef struct bomb_list bomb_list;

//creates a new bomb_list
extern t_bomb_list bomb_list_init(t_bomb bomb);

//add a bomb inside the bomb_list
extern void list_add(t_bomb_list bomb_list,t_bomb bomb);

//Returns the first cell and the last of the bomb_list
extern t_cell get_first(t_bomb_list bomb_list);
extern t_cell get_end(t_bomb_list bomb_list);

//Returns the bomb of the cell
extern t_bomb get_bomb(t_cell cell);

//Returns the next and the previous cell
extern t_cell get_next_cell(t_cell cell);
extern t_cell get_previous_cell(t_cell cell);

//Delete a specific bomb from the bomb_list
extern void bomb_list_delete(t_bomb_list bomb_list, t_bomb bomb);

//Read through the bomb_list and delete the bomb that already exploded
extern void bomb_list_update(t_bomb_list bomb_list);

//Display every bomb of the bomb_list
extern void bomb_list_display(t_bomb_list bomb_list,t_map map,t_player player,t_monster_list monster_list, SDL_Surface *screen);

#endif /* BOMB_LIST_H_ */

